﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace FluentHtmlHelpers.Controllers
{
    public class VideoServerController : Controller
    {
        //
        // GET: /VideoServer/

        //public ActionResult Index()
        //{
        //    return View();
        //}

        [HttpPost]
        public ActionResult UploadVideo(HttpPostedFileBase video)
        {
            var path = Path.Combine(HttpContext.Server.MapPath("~/content"), Path.GetFileName(video.FileName));
            video.SaveAs(path);
            return new ContentResult { Content = "success" };
        }


        //
        // GET: /VideoServer/Details/5

        //public ActionResult Details(int id)
        //{
        //    return View();
        //}

        ////
        //// GET: /VideoServer/Create

        //public ActionResult Create()
        //{
        //    return View();
        //}

        ////
        //// POST: /VideoServer/Create

        //[HttpPost]
        //public ActionResult Create(FormCollection collection)
        //{
        //    try
        //    {
        //        // TODO: Add insert logic here

        //        return RedirectToAction("Index");
        //    }
        //    catch
        //    {
        //        return View();
        //    }
        //}

        ////
        //// GET: /VideoServer/Edit/5

        //public ActionResult Edit(int id)
        //{
        //    return View();
        //}

        ////
        //// POST: /VideoServer/Edit/5

        //[HttpPost]
        //public ActionResult Edit(int id, FormCollection collection)
        //{
        //    try
        //    {
        //        // TODO: Add update logic here

        //        return RedirectToAction("Index");
        //    }
        //    catch
        //    {
        //        return View();
        //    }
        //}

        ////
        //// GET: /VideoServer/Delete/5

        //public ActionResult Delete(int id)
        //{
        //    return View();
        //}

        ////
        //// POST: /VideoServer/Delete/5

        //[HttpPost]
        //public ActionResult Delete(int id, FormCollection collection)
        //{
        //    try
        //    {
        //        // TODO: Add delete logic here

        //        return RedirectToAction("Index");
        //    }
        //    catch
        //    {
        //        return View();
        //    }
        //}
    }
}
